﻿#include "commonutils.h"
#include "define.h"
#include <QFile>

CommonUtils::CommonUtils()
{

}

void CommonUtils::loadStyleSheet(QWidget *widget, const QString &fileName, const QString &otherStyle)
{
    if(!widget)return;
    widget->setStyleSheet(QString());
    const QString filePath=QRC_QSS(fileName);
    QFile file(filePath);
    if(file.open(QFile::ReadOnly))
    {
         QString qss=file.readAll();
         qss+=otherStyle;

         widget->setStyleSheet(qss);
         file.close();
    }
}
